﻿using Apps.Common;
using Apps.DAL.HC;
using Apps.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BLL.HC
{
    public partial class HC_ITEMS_BLL
    {
        HC_ITEMS_Repository dal = new HC_ITEMS_Repository();
        HC_ITEM_EXTEND_REL_Repository relDal = new HC_ITEM_EXTEND_REL_Repository();
        public bool DoAdd(HC_ITEMS_EXTEND itemsEextend_model)
        {
            if (itemsEextend_model == null) return false;
            return dal.DoAdd(itemsEextend_model);
        }

        public List<HC_ITEMS> GetList(string queryStr, int pageIndex, int pageSize, string sortFiled, string orderBy, ref int totalCount)
        {
            return dal.GetList(queryStr, pageIndex, pageSize, sortFiled, orderBy, ref totalCount);
        }
        public bool DoEdit(HC_ITEMS_EXTEND itemsEextend_model)
        {
            if (itemsEextend_model == null) return false;
            return dal.DoEdit(itemsEextend_model);
        }

        public bool DoDelete(string id)
        {
            return dal.DoDelete(id);
        }

        public bool AddIsRepeated(string filedStr)
        {
            return dal.AddIsRepeated(filedStr);
        }

        public bool EditIsRepeated(string id, string filedStr)
        {
            return dal.EditIsRepeated(id, filedStr);
        }

        public HC_ITEMS GetById(string id)
        {
            return dal.GetById(id);
        }

        public List<HC_ITEMS> GetList(string queryStr)
        {
            return dal.GetList(queryStr);
        }

        public HC_ITEM_FIELD_VO GetFieldInfoByItemId(string itemId)
        {
            return dal.GetFieldInfoByItemId(itemId);
        }

        public List<V_HC_ITEM_FIELD_VALUE> Get_FIELD_REFERENCE_VALUE_List(string itemId, int pageIndex, int pageSize, string sortFiled, string orderBy, ref int totalCount)
        {
            return dal.Get_FIELD_REFERENCE_VALUE_List(itemId, pageIndex, pageSize, sortFiled, orderBy, ref totalCount);
        }

        public List<V_HC_ITEM_FIELD_VALUE> Get_FIELD_REFERENCE_VALUE_List(string itemId)
        {
            return dal.Get_FIELD_REFERENCE_VALUE_List(itemId);
        }

        public HC_ITEMS_EXTEND Get_ITEMS_EXTEND(string ItemId)
        {
            return dal.Get_ITEMS_EXTEND(ItemId);
        }
    }
}
